<?php
/**
 * 轮播图模型
 * User 1874
 */

namespace app\adminplatform\model;

use think\facade\Request;
use think\Model;

class Carousel extends Model {
    /*
     * 轮播列表
     * @param array $map 条件数组
     */
    public static function carouselList(array $map=[]){

        return Carousel::where($map)->order('ca_id DESC')->paginate(["list_rows"=>PageNum,'query'=>Request::param()]);
    }
    /*
     * 轮播单条信息
     * @param array $map 条件数组
     */
    public static function carouselInfo(array $map=[]){

        return Carousel::where($map)->find();
    }

}